import React, { useState } from 'react';
import './CategrayList.scss';
function CategrayList({ list,txtstr }) {
   // const [txt, setTxt] = useState(txtstr);
   const [txt, setTxt] = useState("");
   // console.log('txtstr',txtstr)
   console.log('txt',txt)
   const handleClick = (event) => {
      console.log('check',event)
      // setTxt(k)
    }
   return (
      // handleClick(e.target.innerText)
      // setTxt(e.target.innerText)
      <li className='item active' onClick={(e)=>{setTxt(list.name)}}>{list.name}</li>
   );
}

export default CategrayList;